<html>
<head><meta charset="utf-8"><title>memory problems on 32-bit · t-compiler/performance · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/index.html">t-compiler/performance</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html">memory problems on 32-bit</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="211283827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211283827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211283827">(Sep 25 2020 at 16:51)</a>:</h4>
<p>in distros, we usually prefer release-with-debuginfo builds, but I've had to disable that for rustc on 32-bit hosts due to OOM</p>



<a name="211283846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211283846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211283846">(Sep 25 2020 at 16:51)</a>:</h4>
<p>(all builds are native)</p>



<a name="211283888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211283888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211283888">(Sep 25 2020 at 16:51)</a>:</h4>
<p>isn't that a linker issue?</p>



<a name="211283988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211283988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211283988">(Sep 25 2020 at 16:52)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> I think it was actually a rustc process that got out of hand, for <code>rustc_middle</code> or the older equivalent IIRC</p>



<a name="211284070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284070">(Sep 25 2020 at 16:53)</a>:</h4>
<p>weird. maybe it's the LLVM encoding of DWARF that's causing that</p>



<a name="211284082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284082">(Sep 25 2020 at 16:53)</a>:</h4>
<p><span class="user-mention" data-user-id="138448">@cuviper</span> have you tried lowering the debuginfo from 2 to 1?</p>



<a name="211284118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284118">(Sep 25 2020 at 16:53)</a>:</h4>
<p>I have seen similar problems linking LLVM itself, but that's not part of our distro rustc builds</p>



<a name="211284120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284120">(Sep 25 2020 at 16:53)</a>:</h4>
<p>still useful for backtraces, but shouldn't take as many resources to build</p>



<a name="211284277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284277">(Sep 25 2020 at 16:54)</a>:</h4>
<p>/me never built rustc with full debuginfo on purpose but always enables the line-only aka level 1 debuginfo</p>



<a name="211284296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284296">(Sep 25 2020 at 16:55)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> I thought I tried that, but I'm not sure now. to be honest, those 32-bit targets are of much lower concern these days, so I'm kind of OK with just getting a functional compiler at all</p>



<a name="211284344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284344">(Sep 25 2020 at 16:55)</a>:</h4>
<p>actually I think you shouldn't use full debuginfo on 64-bit either</p>



<a name="211284381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284381">(Sep 25 2020 at 16:55)</a>:</h4>
<p>I recall something about libbacktrace bugs when there's more than 2GB of DWARF or so</p>



<a name="211284389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284389">(Sep 25 2020 at 16:55)</a>:</h4>
<p>we prefer full debuginfo as a matter of distro policy</p>



<a name="211284408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284408">(Sep 25 2020 at 16:55)</a>:</h4>
<p>right, but you should test it :P</p>



<a name="211284471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284471">(Sep 25 2020 at 16:56)</a>:</h4>
<p>it's also stripped to a separate package thoguh</p>



<a name="211284496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284496">(Sep 25 2020 at 16:56)</a>:</h4>
<p>sure, but I would install that if I want an accurate backtrace</p>



<a name="211284512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284512">(Sep 25 2020 at 16:56)</a>:</h4>
<p>(and then get a crash if that bug is still there)</p>



<a name="211284599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284599">(Sep 25 2020 at 16:57)</a>:</h4>
<p>you can use any regular rustc error and pass <code>-Z treat-err-as-bug</code> while having <code>RUST_BACKTRACE=1</code> set</p>



<a name="211284608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284608">(Sep 25 2020 at 16:57)</a>:</h4>
<p><a href="https://koji.fedoraproject.org/koji/rpminfo?fileOrder=-size&amp;rpmID=23033751&amp;buildrootOrder=-id&amp;buildrootStart=0#filelist">https://koji.fedoraproject.org/koji/rpminfo?fileOrder=-size&amp;rpmID=23033751&amp;buildrootOrder=-id&amp;buildrootStart=0#filelist</a></p>



<a name="211284626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284626">(Sep 25 2020 at 16:57)</a>:</h4>
<p>biggest is ~900MB</p>



<a name="211284642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284642">(Sep 25 2020 at 16:57)</a>:</h4>
<p>huh</p>



<a name="211284759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284759">(Sep 25 2020 at 16:58)</a>:</h4>
<p>anyway, the bigger concern would be if even release w/ debug=0 starting using too much memory for 32-bit hosts</p>



<a name="211284761"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284761" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284761">(Sep 25 2020 at 16:58)</a>:</h4>
<p>I wonder what the difference is (i.e. why you have only 900MB)...cc  <span class="user-mention" data-user-id="211727">@Jonas Schievink</span> I think I talked to them a few months ago about the 2GB thing</p>



<a name="211284845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284845">(Sep 25 2020 at 16:59)</a>:</h4>
<p>our builders do have lots of total memory, so it's a matter of per-process address space</p>



<a name="211284875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284875">(Sep 25 2020 at 16:59)</a>:</h4>
<p>...I faintly remember some cursed thing here, yes</p>



<a name="211284883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284883">(Sep 25 2020 at 16:59)</a>:</h4>
<p>but not much more :D</p>



<a name="211284983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284983">(Sep 25 2020 at 17:00)</a>:</h4>
<p><span class="user-mention" data-user-id="211727">@Jonas Schievink</span> do you know when the last time was when you built rustc with full debuginfo?</p>



<a name="211284990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211284990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211284990">(Sep 25 2020 at 17:00)</a>:</h4>
<p>and if it was broken still</p>



<a name="211285039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211285039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211285039">(Sep 25 2020 at 17:01)</a>:</h4>
<p>@eddyb maybe you had full debuginfo including static LLVM and its debuginfo?</p>



<a name="211285045"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211285045" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211285045">(Sep 25 2020 at 17:01)</a>:</h4>
<p>Don't remember exactly, no. I don't really do full debuginfo builds anymore.</p>



<a name="211285100"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211285100" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211285100">(Sep 25 2020 at 17:01)</a>:</h4>
<p>ours is dynamic LLVM</p>



<a name="211285131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211285131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211285131">(Sep 25 2020 at 17:01)</a>:</h4>
<p>I never hit this because I don't build rustc with full debuginfo. it's possible the people who did enabled debug LLVM as well</p>



<a name="211285228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211285228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211285228">(Sep 25 2020 at 17:02)</a>:</h4>
<p><span class="user-mention" data-user-id="138448">@cuviper</span> hmm I wonder if the max RSS drops when you reduce codegen units to a small number (or just 1)</p>



<a name="211285288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211285288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211285288">(Sep 25 2020 at 17:02)</a>:</h4>
<p>there's also a <code>-Z</code> flag to disable multiple LLVM threads</p>



<a name="211285305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211285305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211285305">(Sep 25 2020 at 17:02)</a>:</h4>
<p>woah, <a href="https://koji.fedoraproject.org/koji/rpminfo?rpmID=23322027">https://koji.fedoraproject.org/koji/rpminfo?rpmID=23322027</a></p>
<div class="codehilite"><pre><span></span><code>/usr/lib/debug/usr/lib64/libLLVM-11.so-11.0.0-0.2.rc3.fc34.x86_64.debug 2,428,333,752
</code></pre></div>



<a name="211285330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211285330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211285330">(Sep 25 2020 at 17:02)</a>:</h4>
<p>ah there you go :P</p>



<a name="211285391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211285391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211285391">(Sep 25 2020 at 17:03)</a>:</h4>
<p>anyway I'm getting a few ideas for reducing memory usage but... most of them come at some expense in terms of time</p>



<a name="211285411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211285411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211285411">(Sep 25 2020 at 17:03)</a>:</h4>
<p>it's easier to just throw 64-bit processes at the problem</p>



<a name="211285507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211285507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211285507">(Sep 25 2020 at 17:04)</a>:</h4>
<p>yeah, I don't really want to spend developer time on 32-bit hosts, as long as it can limp along...</p>



<a name="211285748"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211285748" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211285748">(Sep 25 2020 at 17:06)</a>:</h4>
<p>one hilarious thing I just thought of is using tmpfs as a "manual swap" backend for a 32-bit process, since it's in RAM (however much the system actually has) and can exceed 4GB, so it should be faster than touching any real disks</p>



<a name="211285910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211285910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mati865 <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211285910">(Sep 25 2020 at 17:07)</a>:</h4>
<p>On 32 bit Windows with <em>incremental enabled</em> Rust cannot bootstrap on the first try either (every re-run it fails further).</p>



<a name="211285930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211285930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211285930">(Sep 25 2020 at 17:07)</a>:</h4>
<p>love it</p>



<a name="211286034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211286034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211286034">(Sep 25 2020 at 17:08)</a>:</h4>
<p>I think ARM userspace is strictly limited to 2GB address space, and i686 may be 2/3GB</p>



<a name="211286061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211286061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211286061">(Sep 25 2020 at 17:08)</a>:</h4>
<p>I vaguely recall i686 allowing all 4GB if you use a 64-bit kernel, but I'm not sure of that</p>



<a name="211286095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211286095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mati865 <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211286095">(Sep 25 2020 at 17:09)</a>:</h4>
<p>For Windows i686 it's 2 GiB, on Linux I think process can use 3 GiB.</p>



<a name="211286098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211286098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211286098">(Sep 25 2020 at 17:09)</a>:</h4>
<p>(incremental is part of what I was thinking of with the "manually swapping", since it already has save &amp; restore, we would just have to be a bit more clever wrt certain aspects)</p>



<a name="211286278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211286278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211286278">(Sep 25 2020 at 17:10)</a>:</h4>
<p><span class="user-mention" data-user-id="119581">@mati865</span> Windows has a /3GB switch too</p>



<a name="211286407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211286407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mati865 <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211286407">(Sep 25 2020 at 17:12)</a>:</h4>
<p><span class="user-mention" data-user-id="138448">@cuviper</span> but it's configured at the boot time and breaks some 32-bit applications...</p>



<a name="211286735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211286735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211286735">(Sep 25 2020 at 17:14)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> sorry that I derailed this topic on the memory tangent...</p>



<a name="211286774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211286774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211286774">(Sep 25 2020 at 17:15)</a>:</h4>
<p>you can always fork the topic :D</p>



<a name="211289813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211289813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211289813">(Sep 25 2020 at 17:41)</a>:</h4>
<p>regarding the tmpfs idea, eternaleye pointed out <code>memfd_create</code> to me, which looks really cool</p>



<a name="211293511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/memory%20problems%20on%2032-bit/near/211293511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/memory.20problems.20on.2032-bit.html#211293511">(Sep 25 2020 at 18:10)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> memfd is very much as cool as it looks. :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>